package com.paper.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

import com.paper.entity.Subtopics;
@Repository
public interface SubtopicsRepository extends PagingAndSortingRepository<Subtopics, Long>, JpaSpecificationExecutor<Subtopics> {
	@Query(value="from Subtopics s where s.blank.id=?1")
	public List<Subtopics> findByBlankId(Long bId);
	@Query(value="from Subtopics s where s.single.id=?1")
	public List<Subtopics> findBySingleId(Long id);
	@Query(value="from Subtopics s where s.multiple.id=?1")
	public List<Subtopics> findByMultipleId(Long id);
	@Query(value="from Subtopics s where s.judgment.id=?1")
	public List<Subtopics> findByJudgmentId(Long id);
	@Query(value="from Subtopics s where s.explanation.id=?1")
	public List<Subtopics> findByExplId(Long id);
}
